@extends('layout.home')
@section('title','个人中心_信息修改')
@section('content')	
<div class="aw-container-wrap">
	<div class="container">
		<div class="row">
			<div class="aw-content-wraps clearfix">
				<div class="aw-user-setting">
					<div class="tabbable">
						<ul class="nav nav-tabs aw-nav-tabs active">
							<li class="active"><a href="#/account/setting/profile/">基本资料</a></li>
							<h2><i class="icon icon-setting"></i> 用户设置</h2>
						</ul>
					</div>
					<div class="tab-content clearfix">
					<!-- 基本信息 -->
					<div class="aw-mod">
						<div class="mod-body">
							<form class="mws-form form-group" action="/user/centerupdate" method="post" enctype="multipart/form-data">
							@if(count($errors) > 0)
				            <div class="mws-form-message warning">
				                @foreach($errors->all() as $error)
				                    {{$error}}<br>
				                @endforeach
				            </div>
				            @endif
								<div class="aw-mod mod-contact">
									<div class="mod-head">
										<h3>基本信息</h3>
									</div>
					    			<div class="mod-body clearfix">
					    				<ul>
					    					<li>
					    						<label class="mws-form-label">用户名：</label>
					    						<input  type="text" name="username" value="{{$user->username}}">
					    					</li>
					    					<li>
					    						<label class="mws-form-label">邮箱：</label>
					    						<input  type="text" name="email" value="{{$user->email}}">
					    					</li>
					    					

											<div style="margin:10px 0px">				    			
					    						<label class="mws-form-label">性别：</label>
    											<input type="radio" name="sex" value="1" @if($user->sex == 1) checked @endif>&nbsp;男&nbsp;&nbsp;&nbsp;
    											<input type="radio" name="sex" value="0" @if($user->sex == 0) checked @endif>&nbsp;女&nbsp;&nbsp;&nbsp;
    											<input type="radio" name="sex" value="0" @if($user->sex == 2) checked @endif>&nbsp;保密
    										</div>
	                    					<li>
						    					<label class="mws-form-label">头像：</label>
						                        <img src="{{$user->profile}}" width="200" alt="">
						    					<input class="form-control" type="file" name="profile" value="{{$user->profile}}">
						    				</li>


										</ul>
									</div>

								</div>
								<div class="mws-button-row">
									<!-- 添加隐藏域 -->
									{{csrf_field()}}
							        <input type="hidden" name="id" value="{{$user->id}}">
									<input value="修改" class="btn btn-danger" type="submit">
									<input value="重置" class="btn " type="reset">
						    	</div>
		    				</form>	
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

@endsection